<%@ page import="com.org.entity.User" %><%--
  Created by IntelliJ IDEA.
  User: 86176
  Date: 2024/7/25
  Time: 10:39
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<script src="<%=request.getContextPath()%>/js/jquery-3.1.1.min.js"></script>
<html>
<head>
    <%@ page isELIgnored="false" %>
    <title>Title</title>
</head>
<body>
<%--<%
    String username = null;
    Cookie[] cookies = request.getCookies();
    if(cookies != null){
        for(int i = 0;i < cookies.length;i++){
            username = cookies[i].getValue();
        }
    }
%>--%>
<%--你好，<%=username%>--%>

<%
    User user = (User) request.getSession().getAttribute("user");
    if(user == null){
        response.sendRedirect("login.html");
    }
%>

${user.username},登录成功。<a href="/LoginOut">安全退出</a>

<%--你好,${user.username}--%>
</body>
</html>
